﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace JXC.Core.Models
{
    /// <summary>
    /// 订单表
    /// </summary>
    public class Order
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public Guid Id { get; set; }//订单单号

        public DateTime OrderDate { get; set; }//订单日期
        [ForeignKey("TheCustomerTableId")]
        public Guid Client { get; set; }//客户

        public string Currency { get; set; }//货币
        [ForeignKey("UserInfosId")]
        public Guid SalesPerson { get; set; }//销售人

        public DateTime SalesDate { get; set; }//销售日期

        public string PaymentMethod { get; set; }//付款方式

        public string DeliveryPoints { get; set; }//交货地点

        public string Remark { get; set; }//备注

        public int CompletionStatus { get; set; }//完成状态
        [ForeignKey("UserInfosId")]
        public Guid Operator { get; set; }//操作员
        [ForeignKey("UserInfosId")]
        public Guid Auditor { get; set; }//审核人

        public int AuditStatus { get; set; }  //审核状态
      
        public UserInfos  UserInfos { get; set; }
        public TheCustomerTable TheCustomerTable { get; set; }

    }
}
